package test;

import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

/**
 * 数组倒序
 */
public class InvertedOrder {
    public static void main(String[] args) {
        int[] nums = new int[10];
        Random random = new Random();
        for (int i = 0; i < nums.length; i++) {
            nums[i] = random.nextInt(20)+1;
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]+"\t");
        }
        System.out.println();
        for (int i = nums.length-1; i >= 0; i--) {
            System.out.print(nums[i] +"\t");
        }

    }
}
